package com.whfc.hdc.enums;

/**
 * @author qzexing
 * @version 1.0
 * @date 2021-04-20 17:24
 */
public enum FshWarnRuleType {

    DROP(101, "跌落报警"),
    FALL(102, "摔倒报警"),
    DOFF(103, "脱帽报警"),
    SOS(104, "SOS报警"),
    CRASH(105, "碰撞报警"),
    STILL(106, "静止报警");


    private final Integer value;

    private final String desc;

    FshWarnRuleType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }


    public static FshWarnRuleType parseRuleType(Integer value) {
        if (value == null) {
            return null;
        }
        switch (value) {
            case 101:
                return DROP;
            case 102:
                return FALL;
            case 103:
                return DOFF;
            case 104:
                return SOS;
            case 105:
                return CRASH;
            case 106:
                return STILL;
            default:
                return null;
        }
    }


}
